package ejb.manager;

import java.text.SimpleDateFormat;
import java.util.Calendar;

import javax.ejb.Stateless;

@Stateless
public class DefaultDateConverter implements DateConverter {
	
	@Override
	public String numberToDate(int days){
		SimpleDateFormat sdf = new SimpleDateFormat("dd.MM");
		String result = null;
		Calendar currentDate = Calendar.getInstance();
		currentDate.add(Calendar.DAY_OF_MONTH, days);		
		result = sdf.format(currentDate.getTime()); 
		return result;
	}

}
